package com.ruoyi.xiche.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.xiche.domain.ServiceItem;
import com.ruoyi.xiche.domain.StoreServiceDTO;
import com.ruoyi.xiche.service.ServiceItemService;
import com.ruoyi.xiche.mapper.ServiceItemMapper;
import org.aspectj.lang.annotation.After;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author wangruoyang
* @description 针对表【service_item(服务项目表)】的数据库操作Service实现
* @createDate 2025-03-17 19:32:42
*/
@Service
public class ServiceItemServiceImpl extends ServiceImpl<ServiceItemMapper, ServiceItem>
    implements ServiceItemService{


    @Autowired
    private ServiceItemMapper serviceItemMapper;

    @Override
    public StoreServiceDTO getServiceItemsByStoreId(Long storeId) {
        List<ServiceItem> serviceItems = serviceItemMapper.getServiceItemsByStoreId(storeId);
        StoreServiceDTO dto = new StoreServiceDTO();
        dto.setStoreId(storeId);
        dto.setServiceItems(serviceItems);
        return dto;
    }
}




